home *** CD-ROM | disk | FTP | other *** search
/ Spidla DivX / DivX.bin / CatDV Pro 3.0.8 / lib / parser.jar / com / sun / xml / parser / AttributeListImpl.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-02-23  |  2.1 KB  |  86 lines

  1. package com.sun.xml.parser;
  2.  
  3. import java.util.Vector;
  4.  
  5. final class AttributeListImpl implements AttributeListEx {
  6.    private Vector names = new Vector();
  7.    private Vector types = new Vector();
  8.    private Vector values = new Vector();
  9.    private Vector specified = new Vector();
  10.    private Vector defaults = new Vector();
  11.    private String idAttributeName;
  12.  
  13.    public void addAttribute(String var1, String var2, String var3, String var4, boolean var5) {
  14.       this.names.addElement(var1);
  15.       this.types.addElement(var2);
  16.       this.values.addElement(var3);
  17.       this.defaults.addElement(var4);
  18.       this.specified.addElement(var5 ? Boolean.TRUE : null);
  19.    }
  20.  
  21.    public void clear() {
  22.       this.names.removeAllElements();
  23.       this.types.removeAllElements();
  24.       this.values.removeAllElements();
  25.       this.specified.removeAllElements();
  26.       this.defaults.removeAllElements();
  27.    }
  28.  
  29.    public String getDefault(int var1) {
  30.       try {
  31.          return var1 < 0 ? null : (String)this.defaults.elementAt(var1);
  32.       } catch (IndexOutOfBoundsException var2) {
  33.          return null;
  34.       }
  35.    }
  36.  
  37.    public String getIdAttributeName() {
  38.       return this.idAttributeName;
  39.    }
  40.  
  41.    public int getLength() {
  42.       return this.names.size();
  43.    }
  44.  
  45.    public String getName(int var1) {
  46.       try {
  47.          return var1 < 0 ? null : (String)this.names.elementAt(var1);
  48.       } catch (IndexOutOfBoundsException var2) {
  49.          return null;
  50.       }
  51.    }
  52.  
  53.    public String getType(int var1) {
  54.       try {
  55.          return var1 < 0 ? null : (String)this.types.elementAt(var1);
  56.       } catch (IndexOutOfBoundsException var2) {
  57.          return null;
  58.       }
  59.    }
  60.  
  61.    public String getType(String var1) {
  62.       return this.getType(this.names.indexOf(var1));
  63.    }
  64.  
  65.    public String getValue(int var1) {
  66.       try {
  67.          return var1 < 0 ? null : (String)this.values.elementAt(var1);
  68.       } catch (IndexOutOfBoundsException var2) {
  69.          return null;
  70.       }
  71.    }
  72.  
  73.    public String getValue(String var1) {
  74.       return this.getValue(this.names.indexOf(var1));
  75.    }
  76.  
  77.    public boolean isSpecified(int var1) {
  78.       Object var2 = this.specified.elementAt(var1);
  79.       return var2 == Boolean.TRUE;
  80.    }
  81.  
  82.    void setIdAttributeName(String var1) {
  83.       this.idAttributeName = var1;
  84.    }
  85. }
  86.